/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jkoa.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "pekerja")
@NamedQueries({
    @NamedQuery(name = "Pekerja.findAll", query = "SELECT p FROM Pekerja p")})
public class Pekerja implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_pekerja")
    private Integer idPekerja;
    @Column(name = "id_mohon")
    private Integer idMohon;
    @Column(name = "trh_mula")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhMula;
    @Column(name = "trh_akhir")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhAkhir;
    @Basic(optional = false)
    @Column(name = "dimasuk")
    private String dimasuk;
    @Basic(optional = false)
    @Column(name = "trh_masuk")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhMasuk;
    @Column(name = "dikkini")
    private String dikkini;
    @Column(name = "trh_kkini")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhKkini;

    public Pekerja() {
    }

    public Pekerja(Integer idPekerja) {
        this.idPekerja = idPekerja;
    }

    public Pekerja(Integer idPekerja, String dimasuk, Date trhMasuk) {
        this.idPekerja = idPekerja;
        this.dimasuk = dimasuk;
        this.trhMasuk = trhMasuk;
    }

    public Integer getIdPekerja() {
        return idPekerja;
    }

    public void setIdPekerja(Integer idPekerja) {
        this.idPekerja = idPekerja;
    }

    public Integer getIdMohon() {
        return idMohon;
    }

    public void setIdMohon(Integer idMohon) {
        this.idMohon = idMohon;
    }

    public Date getTrhMula() {
        return trhMula;
    }

    public void setTrhMula(Date trhMula) {
        this.trhMula = trhMula;
    }

    public Date getTrhAkhir() {
        return trhAkhir;
    }

    public void setTrhAkhir(Date trhAkhir) {
        this.trhAkhir = trhAkhir;
    }

    public String getDimasuk() {
        return dimasuk;
    }

    public void setDimasuk(String dimasuk) {
        this.dimasuk = dimasuk;
    }

    public Date getTrhMasuk() {
        return trhMasuk;
    }

    public void setTrhMasuk(Date trhMasuk) {
        this.trhMasuk = trhMasuk;
    }

    public String getDikkini() {
        return dikkini;
    }

    public void setDikkini(String dikkini) {
        this.dikkini = dikkini;
    }

    public Date getTrhKkini() {
        return trhKkini;
    }

    public void setTrhKkini(Date trhKkini) {
        this.trhKkini = trhKkini;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idPekerja != null ? idPekerja.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pekerja)) {
            return false;
        }
        Pekerja other = (Pekerja) object;
        if ((this.idPekerja == null && other.idPekerja != null) || (this.idPekerja != null && !this.idPekerja.equals(other.idPekerja))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jkoa.model.Pekerja[ idPekerja=" + idPekerja + " ]";
    }
    
}
